/*
 * @Description: 
 * @Version: 1.0
 * @Author: tao
 * @Date: 2021-01-20 11:59:16
 * @LastEditors: tao
 * @LastEditTime: 2021-03-26 17:31:31
 */
import {
  request,
  IP
} from './request'

export function downloadFile(url) {
  return request({
    url,
    responseType: 'blob'
  }, {}, true)
}

export function review(data) {
  return request({
    url: `/teacher/projectCheck`,
    headers: {
      "Content-type": "multipart/form-data"
    },
    params: data
  })
}

export function getDataByPageAndSize(page = 1, size = 10) {
  return request({
    url: `/teacher/projectList`,
    params: {
      page,
      size
    }
  })
}

export function searchById(params) {
  return request({
    url: `/teacher/projectFind`,
    params
  })
}

export function editData(data) {
  return request({
    url: `/teacher/projectEdit`,
    method: 'post',
    data
  })
}

export function deleteById(id) {
  return request({
    url: `/teacher/projectDel?id=${id}`,
  })
}

export function appendData(data) {
  return request({
    url: `/teacher/projectAdd`,
    method: 'post',
    data
  })
}

export function getProjectType() {
  return request({
    url: `/teacher/projecttype`
  })
}